<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>多彩主题背景切换</title>
    <style>
        * {
            padding: 0;
            margin: 0;
            box-sizing: border-box;
        }

        body {
            
            background-size: cover;
            font-family: 'Arial', 'Microsoft YaHei', sans-serif;
            transition: background 1.5s cubic-bezier(0.25, 0.1, 0.25, 1);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            position: relative;
        }

        body::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(120deg, rgba(135, 206, 235, 0.3) 0%, rgba(70, 130, 180, 0.2) 100%);
            z-index: -1;
        }

        .header {
            text-align: center;
            margin-bottom: 40px;
            color: #2a6ba5;
            text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.7);
        }

        .header h1 {
            font-size: 2.8rem;
            margin-bottom: 15px;
            font-weight: 400;
        }

        .header p {
            font-size: 1.2rem;
            opacity: 0.9;
        }

        .nav {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 25px;
            width: 90%;
            max-width: 900px;
            height: 250px;
            padding: 30px;
            background-color: rgba(255, 255, 255, 0.75);
            border-radius: 25px;
            box-shadow: 0 12px 30px rgba(42, 107, 165, 0.2);
            backdrop-filter: blur(6px);
            border: 1px solid rgba(255, 255, 255, 0.7);
        }

        .image-container {
            position: relative;
            border-radius: 15px;
            overflow: hidden;
            transition: all 0.5s ease;
            box-shadow: 0 10px 20px rgba(42, 107, 165, 0.15);
        }

        .nav img {
            width: 170px;
            height: 200px;
            object-fit: cover;
            display: block;
            transition: all 0.5s ease;
        }

        .image-container:hover {
            transform: translateY(-10px) scale(1.03);
            box-shadow: 0 20px 30px rgba(42, 107, 165, 0.25);
        }

        .image-container:hover img {
            transform: scale(1.1);
        }

        .image-name {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(to top, rgba(42, 107, 165, 0.9), transparent);
            padding: 15px;
            text-align: center;
            font-size: 1.1rem;
            color: white;
            transform: translateY(100%);
            transition: transform 0.5s ease;
        }

        .image-container:hover .image-name {
            transform: translateY(0);
        }

        .controls {
            margin-top: 40px;
            display: flex;
            gap: 20px;
        }

        .control-btn {
            padding: 12px 25px;
            background: rgba(255, 255, 255, 0.8);
            border: none;
            border-radius: 30px;
            color: #2a6ba5;
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(42, 107, 165, 0.2);
        }

        .control-btn:hover {
            background: rgba(255, 255, 255, 1);
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(42, 107, 165, 0.3);
        }

        .info-panel {
            margin-top: 25px;
            text-align: center;
            background: rgba(255, 255, 255, 0.8);
            padding: 15px 30px;
            border-radius: 30px;
            color: #2a6ba5;
            font-size: 1rem;
            box-shadow: 0 5px 15px rgba(42, 107, 165, 0.2);
        }
    </style>
</head>

<body>
    <div class="header">
        <h1>多彩主题背景切换</h1>
    </div>

    <div class="nav">
        <div class="image-container">
            <img src="https://www.2008php.com/2012_Website_appreciate/2012-04-26/20120426225219.jpg?auto=format&fit=crop&w=400&h=500&q=80" alt="晴空万里">
            <div class="image-name">晴空</div>
        </div>
        <div class="image-container">
            <img src="https://img.pconline.com.cn/images/upload/upc/tx/photoblog/1108/21/c2/8718295_8718295_1313894289765_mthumb.jpg?auto=format&fit=crop&w=400&h=500&q=80" alt="云海">
            <div class="image-name">云海</div>
        </div>
        <div class="image-container">
            <img src="https://img.shetu66.com/2024/02/19/170834551851470548.png?auto=format&fit=crop&w=400&h=500&q=80" alt="日落">
            <div class="image-name">日落</div>
        </div>
        <div class="image-container">
            <img src="https://x0.ifengimg.com/ucms/2022_35/15E01D37B00CBCD7BFCD3946AFF9D3C1822B6989_size74_w1080_h720.jpg?auto=format&fit=crop&w=400&h=500&q=80" alt="星空">
            <div class="image-name">星空</div>
        </div>
    </div>

    <div class="controls">
        <button class="control-btn" id="blurBtn">模糊背景</button>
    </div>

    <script>
        var images = document.querySelector('.nav').querySelectorAll('img');
        var blurBtn = document.getElementById('blurBtn');
        var resetBtn = document.getElementById('resetBtn');
        var isBlurred = false;
        
        for (var i = 0; i < images.length; i++) {
            images[i].onclick = function() {
                document.body.style.backgroundImage = 'url(' + this.src + ')';
                
                // 添加背景切换动画效果
                document.body.style.opacity = 0;
                setTimeout(function() {
                    document.body.style.opacity = 1;
                }, 200);
            }
        }
        
        // 添加背景模糊功能
        blurBtn.onclick = function() {
            if (!isBlurred) {
                document.body.style.filter = "blur(5px)";
                isBlurred = true;
                blurBtn.textContent = "取消模糊";
            } else {
                document.body.style.filter = "none";
                isBlurred = false;
                blurBtn.textContent = "模糊背景";
            }
        }
        
        
    </script>
</body>
</html>